/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.vunguyen.service;

import com.vunguyen.dao.CongVanDAO;
import com.vunguyen.model.Bomon;
import com.vunguyen.model.Congvan;
import com.vunguyen.model.Congvanden;
import com.vunguyen.model.Giangvien;
import com.vunguyen.model.Phancongcongvanden;
import com.vunguyen.model.PhancongcongvandenBomon;
import com.vunguyen.model.PhancongcongvandenGiangvien;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * @author HOANGVU
 */

@Service
public class CongVanServiceImpl implements CongVanService{
    
    @Autowired
    private CongVanDAO congvanDAO;

    @Override
    @Transactional
    public List<Congvan> getCongVan() {
        return this.congvanDAO.getCongVan();
    }

	@Override
    @Transactional
	public List<Congvanden> getCongVanDen() {
		return this.congvanDAO.getCongVanDen();
	}

	@Override
	@Transactional
	public List<Phancongcongvanden> getPhancongcongvanden() {
		return this.congvanDAO.getPhancongcongvanden();
	}

	@Override
	@Transactional
	public void addCongVan(Congvan congvan) {
		congvanDAO.addCongVan(congvan);
	}

	@Override
	@Transactional
	public void addCongVanDen(Congvanden congvanden) {
		congvanDAO.addCongVanDen(congvanden);
		
	}

	@Override
	@Transactional
	public Congvan getCongvanById(String idcongvan) {
		return congvanDAO.getCongvanById(idcongvan);
	}

	@Override
	@Transactional
	public List<Congvan> getListCongvanById(String idcongvan) {
		return congvanDAO.getListCongvanById(idcongvan);
	}

	@Override
	@Transactional
	public void updateCongVan(Congvan congvan, String idCongVan) {
		congvanDAO.updateCongVan(congvan, idCongVan);
		
	}

	@Override
	@Transactional
	public List<Giangvien> getGiangvien(int idcanbo) {
		return congvanDAO.getGiangvien(idcanbo);
	}

	@Override
	@Transactional
	public void addPhanCongCongVanDen(Phancongcongvanden phancongcongvanden) {
		congvanDAO.addPhanCongCongVanDen(phancongcongvanden);
		
	}

	@Override
	@Transactional
	public List<Bomon> getBoMon() {
		return congvanDAO.getBoMon();
	}

	@Override
	@Transactional
	public List<Phancongcongvanden> getPhanCongbyId(String idcongvanden) {
		return congvanDAO.getPhanCongbyId(idcongvanden);
	}

	@Override
	@Transactional
	public List<Phancongcongvanden> getPhanCongbyId(String idcongvanden,
			String nguoiphancong) {
		return congvanDAO.getPhanCongbyId(idcongvanden, nguoiphancong);
	}

	@Override
	@Transactional
	public void updatePhanCong(Phancongcongvanden phancongcongvanden,
			int idphancong) {
		congvanDAO.updatePhanCong(phancongcongvanden, idphancong);
		
	}

	@Override
	@Transactional
	public void xacNhanHoanTat(Phancongcongvanden phancongcongvanden,
			int idphancong) {
		congvanDAO.xacNhanHoanTat(phancongcongvanden, idphancong);
		
	}

	@Override
	@Transactional
	public void themPhancongcongvandenGiangvien(
			PhancongcongvandenGiangvien phancongcongvandenGiangvien) {
		congvanDAO.themPhancongcongvandenGiangvien(phancongcongvandenGiangvien);
		
	}

	@Override
	@Transactional
	public void themPhancongcongvandenBomon(
			PhancongcongvandenBomon phancongcongvandenBomon) {
		congvanDAO.themPhancongcongvandenBomon(phancongcongvandenBomon);
		
	}

	@Override
	@Transactional
	public List<PhancongcongvandenGiangvien> layPhancongcongvandenGiangvien() {
		return congvanDAO.layPhancongcongvandenGiangvien();
	}

	@Override
	@Transactional
	public List<PhancongcongvandenBomon> layPhancongcongvandenBomon() {
		return congvanDAO.layPhancongcongvandenBomon();
	}

	@Override
	@Transactional
	public List<Congvanden> getCongvandenById(String idcongvanden) {
		return congvanDAO.getCongvandenById(idcongvanden);
	}

    
}
